package com.mzy.datepackage.M2022.Apr.twEight;

import org.springframework.scheduling.annotation.Scheduled;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author mzy
 * @Date 2022/4/27 20:48
 * @Version 1.0
 */
public class Demo {

    @Scheduled(cron="0/5 * * * * *")
    public static void demo(){
        System.out.println("6");
    }

//      System.out.println("启动");
//    DataSource dataSource = SpringBootUtils.getApplicationContext().getBean(DataSource.class);
//
//            System.out.println("测试");
//    //		1.注册驱动
////            Class.forName("com.mysql.jdbc.Driver");
//////		2.获取数据库连接
////            connection = DriverManager.getConnection(url, username, password);
//////		3.获取执行sql语句的平台对象啊
////            stat = connection.createStatement();
//////		4.执行sql语句
////            set = stat.executeQuery("select 1");
//
//    connection = dataSource.getConnection();   （重点检查）
//            System.out.println("connection捕获");
////            boolean validConnection = isValidConnection(connection, "select 1", 5);
//
////            EntityManager em = baseDaoFactory.getEm();
////            Query nativeQuery = em.createNativeQuery("SELECT * FROM sys_boot_manage_file");
//    //查询对象
////            BaseDao<SysSecurityUser, Long> dao = daoFactory.getDao(SysSecurityUser.class);
////            List<SysSecurityUser> all = dao.findAll();
////            Query nativeQuery = en.createNativeQuery("SELECT * FROM sys_boot_manage_file;");
//
//    // System.out.println("druid检查:" + validConnection);
//    statement = connection.prepareStatement("select 1");
//    resultSet = statement.executeQuery();
//            System.out.println("捕获");
////            DruidUtils.release(resultSet,statement,connection);
//
//    serverCrashed = false;
//            System.out.println(serverCrashed);


    public static void main(String[] args) {
        demo();
    }
}
